package com.vision.bigDataApi;

import com.github.pagehelper.PageHelper;
import com.vision.bigDataApi.service.mysql.UserService;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;


import java.util.Properties;

@SpringBootApplication
//@MapperScan("com.vision.bigDataApi.mapper")
//@ImportResource("classpath:config/mybatis-config.xml")
public class BigDataApiApplication {

	public static void main(String[] args) {

        ConfigurableApplicationContext run = SpringApplication.run(BigDataApiApplication.class, args);
        //System.out.println(run.getBean(PageHelper.class));
    }
    /*@Bean
      public PageHelper pageHelper(){
               PageHelper pageHelper = new PageHelper();
                Properties properties = new Properties();
                properties.setProperty("offsetAsPageNum","true");
                properties.setProperty("rowBoundsWithCount","true");
                properties.setProperty("reasonable","false");
                //properties.setProperty("dialect","oracle");    //配置oracle数据库的方言
                properties.setProperty("supportMethodsArguments","true");
                properties.setProperty("params","count=countSql");
                properties.setProperty("auto-dialect","true");//默认false,当为true时，自动检验适合的数据库
                properties.setProperty("auto-runtime-dialect","true");//这个一定要加上，不然mysql和oracle分页两个只能用一个，另一个会报错，加上后，两中数据库分页都可以用了
                pageHelper.setProperties(properties);
                return pageHelper;
             }*/

}
